//
//  ShareManager.m
//  MiAiApp
//
//  Created by 胡双喜 on 2018/6/13.
//  Copyright © 2018年 邓超. All rights reserved.
//

#import "ShareManager.h"
//#import <UShareUI/UShareUI.h>

@implementation ShareManager

SINGLETON_FOR_CLASS(ShareManager);

-(void)showShareView{
 
}

- (void)shareWithPlatformType:(SSDKPlatformType)platformType {
    
    //创建分享参数
    NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
    [shareParams SSDKSetupShareParamsByText:@"快来下载Fi-Link吧"
                                     images:@[IMAGE_NAMED(@"icon_small_40")] //传入要分享的图片
                                        url:[NSURL URLWithString:@"https://www/baidu.com"]
                                      title:@"Fi-Link"
                                       type:SSDKContentTypeAuto];
    
    [ShareSDK share:platformType parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
        if (state == SSDKResponseStateSuccess) {
//            [self showActivityWithSuccessMsg:@"分享成功"];
        } else if (state == SSDKResponseStateFail) {
//            [self showActivityWithErrorMsg:@"分享失败"];
        }
    }];
}

@end
